#ifndef __BOACOMPENENT_H__
#define __BOACOMPENENT_H__

#include "cocos2d.h"
#include "Config.h"
#include "Boa.h"
USING_NS_CC;

class BoaComponent : public CCComponent
{
private:
		
	float __speed; // toc do chay
	virtual void update(float delta); // kiem tra tinh trang con tran va thuc hien hanh dong tuong ung....
	CCAction* curAction;//luu hanh dong hien tai de "stop" truoc khi thuc hien hanh dong ke tiep...

	CCSize sizeScreen;

	int m_move_up_count;
	int m_move1_left;

	CCMoveTo* actionMove;

public:

	Boa * parent;

	CCPoint oldpos;

	BoaComponent();
    
	void actionCrawling(); // Trang thai bo
	void actionBite(); // trang thai can
	void actionBodyFly(); // trang thai phi than
	void actionBiteFly(); // trang thai phi than can
	void actionStop(); //ngung tat ca hoat dong trong Game
	// Tron thoat khong co action

	void fBoaMoveTo(CCPoint p);
	void fCallbacktemp(CCObject * object);
};
#endif